package com.cc.Serjava;

import com.cc.entity.EbProductClass;
import com.cc.mapper.ProduClassMapper;
import com.cc.service.IEbProductClassService;
import com.cc.service.IEbProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class EbProductClassServiceImpl implements IEbProductClassService {
    @Autowired
    private ProduClassMapper produClassMapper;

    @Override
    public int save(EbProductClass ebProductClass) {
        return produClassMapper.save(ebProductClass);
    }

    @Override
    public List<EbProductClass> findByPage(Integer page, Integer pageSize){
        int from=(page-1)*pageSize;
        return produClassMapper.findByPage(from,pageSize);
    }

    @Override
    public int total() {
        return produClassMapper.total();
    }

    @Override
    public EbProductClass selectByCondition(int epcid) {
        return produClassMapper.selectByCondition(epcid);
    }
    @Override
    public int updateById(EbProductClass ebProductClass) {
        return produClassMapper.updateByPrimaryKey(ebProductClass);
    }

    @Override
    public List<EbProductClass> selectAll() {
        return produClassMapper.selectAll();
    }

    @Override
    public int delete(int id) {
        return produClassMapper.delete(id);
    }


    @Override
    public EbProductClass selects() {
        return produClassMapper.selects();
    }
    @Override
    public int update(EbProductClass ebProductClass) {
        return produClassMapper.update(ebProductClass);
    }

}
